#!/usr/bin/env python
# -*- coding: GBK -*-

import frame_gen
from reportlab.pdfgen import canvas
from reportlab.lib.units import cm
from reportlab.lib.pagesizes import A4 
import reportlab.rl_config
reportlab.rl_config.warnOnMissingFontGlyphs = 0
from reportlab.pdfbase import pdfmetrics
from reportlab.pdfbase.ttfonts import TTFont
from reportlab.lib import fonts


### Paths variables setting begins ############################
HEI_PATH	= frame_gen.HEI_PATH
SONG_PATH	= frame_gen.SONG_PATH

#Fonts Reg
pdfmetrics.registerFont(TTFont("HEI", HEI_PATH))
pdfmetrics.registerFont(TTFont("SONG", SONG_PATH))


if __name__ == "__main__":
	c = canvas.Canvas('test.pdf',pagesize=A4)
	c.setLineWidth(0.3)
	frame_gen.gen_All(c)
	c.showPage()
	c.save()
